﻿using System.Collections.ObjectModel;
using Oxage.Common;

namespace Oxage.Models
{
	public partial class TransformViewModel : ViewModelBase
	{
		#region Constructor
		public TransformViewModel()
		{
			this.ScaleX = 1;
			this.ScaleY = 1;
			this.ScaleZ = 1;

			this.SampleGCode = @"G01 X0 Y0
G01 X10 Y0
G01 X10 Y10
G01 X0 Y10
G01 X0 Y0
";
		}
		#endregion

		#region Public properties
		public double TranslateX
		{
			get
			{
				return this.translateX;
			}
			set
			{
				if (this.translateX != value)
				{
					this.translateX = value;
					OnPropertyChanged("TranslateX");
				}
			}
		}
		private double translateX;

		public double TranslateY
		{
			get
			{
				return this.translateY;
			}
			set
			{
				if (this.translateY != value)
				{
					this.translateY = value;
					OnPropertyChanged("TranslateY");
				}
			}
		}
		private double translateY;

		public double TranslateZ
		{
			get
			{
				return this.translateZ;
			}
			set
			{
				if (this.translateZ != value)
				{
					this.translateZ = value;
					OnPropertyChanged("TranslateZ");
				}
			}
		}
		private double translateZ;

		public double ScaleX
		{
			get
			{
				return this.scaleX;
			}
			set
			{
				if (this.scaleX != value)
				{
					this.scaleX = value;
					OnPropertyChanged("ScaleX");
				}
			}
		}
		private double scaleX;

		public double ScaleY
		{
			get
			{
				return this.scaleY;
			}
			set
			{
				if (this.scaleY != value)
				{
					this.scaleY = value;
					OnPropertyChanged("ScaleY");
				}
			}
		}
		private double scaleY;

		public double ScaleZ
		{
			get
			{
				return this.scaleZ;
			}
			set
			{
				if (this.scaleZ != value)
				{
					this.scaleZ = value;
					OnPropertyChanged("ScaleZ");
				}
			}
		}
		private double scaleZ;

		public string SampleGCode
		{
			get
			{
				return this.sampleGCode;
			}
			set
			{
				if (this.sampleGCode != value)
				{
					this.sampleGCode = value;
					OnPropertyChanged("SampleGCode");
				}
			}
		}
		private string sampleGCode;

		public string TransformedGCode
		{
			get
			{
				return this.transformedGCode;
			}
			set
			{
				if (this.transformedGCode != value)
				{
					this.transformedGCode = value;
					OnPropertyChanged("TransformedGCode");
				}
			}
		}
		private string transformedGCode;
		#endregion
	}
}
